#pragma once

#ifndef __FRAMERATE_H__
#define __FRAMERATE_H__

#include <deque>

class CFrameRateCounter  
{
public:
    CFrameRateCounter( unsigned long queueLength = 120 );
    virtual ~CFrameRateCounter();

    double GetFrameRate();
    void SetFrameRate( double frameRate );
    void NewFrame();

protected:
    double m_frameRate;
    std::deque<double>  m_frameTime;
    __int64  m_frequency;
    __int64  m_lastTime;
    __int64  m_prevTime;
};



#endif // #ifndef __FRAMERATE_H__
